package lambda;

import java.util.function.Supplier;

/**
 * 构造器引用
 * @author Summerday
 */
public class ConstructorReferenceTest {

    public static void main(String[] args) {

        // 普通lambda
        Supplier<User> sup = () -> new User();

        // 构造器引用
        Supplier<User> supplier = User::new;
        User user = supplier.get();
        System.out.println(user);
    }

}

class User{

}